package us.mooresr.webtroopmanager.shared;

import com.google.gwt.user.client.rpc.IsSerializable;

public class PersonSummary implements IsSerializable, Comparable<PersonSummary> {
	private Long id;
	private String firstName;
	private String lastName;
	
	@SuppressWarnings("unused")
	private PersonSummary() {
		
	}
	
	public PersonSummary(Long id, String firstName, String lastName) {
		this.id = id;
		this.firstName = firstName;
		this.lastName = lastName;
	}
	
	public Long getId() {
		return id;
	}

	public String toString() {
		return firstName + " " + lastName;
	}
	
	

	public String getFirstName() {
		return firstName;
	}

	public String getLastName() {
		return lastName;
	}

	@Override
	public int compareTo(PersonSummary o) {
		String thisValue = lastName + firstName;
		String otherValue = o.lastName + o.firstName;
		return thisValue.compareTo(otherValue);

	}


	
}

